/**   
 * @Title: HelpListAct.java 
 * @Package com.esun.rabbit2.viewer.mainact.optionact 
 * @Description: TODO(帮助列表) 
 * @author: Billy Qigs@500wan.com   
 * @date: 2011-11-16 下午2:20:03  
 * Copyright: (C) 2011 Shenzhen E-sun Sky Net Technology Co.,ltd.
 */
package com.esun.rabbit2.viewer.mainact.optionact;

import com.esun.config.Config;
import com.esun.rabbit2.viewer.WebViewActivity;
import com.esun.ui.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.RelativeLayout;

/**
 * @ClassName: HelpListAct
 * @Description: TODO(帮助列表Activity)
 * @author: Billy Qigs@500wan.com
 * @date: 2011-11-16 下午2:20:03
 * 
 */
public class HelpListAct extends Activity implements OnClickListener {

	private ImageButton btnBack;
	
	private RelativeLayout relativeAbout;
	private RelativeLayout relativeLottery;
	private RelativeLayout relativeRecharge;
	private RelativeLayout relativeExchange;
	private RelativeLayout relativeWithdraw;
	private RelativeLayout relativeRefund;
	private RelativeLayout relativeRealnameAuthentication;
	private RelativeLayout relativeBankCardError;
	private RelativeLayout relativeForget;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.help_list_act);

		initUI();

	}

	private void initUI() {

		btnBack = (ImageButton) findViewById(R.id.option_help_list_act_btn_back);
		btnBack.setOnClickListener(this);
		
		relativeAbout = (RelativeLayout) findViewById(R.id.option_help_about);
		relativeAbout.setOnClickListener(this);

		relativeBankCardError = (RelativeLayout) findViewById(R.id.option_help_bank_error);
		relativeBankCardError.setOnClickListener(this);

		relativeExchange = (RelativeLayout) findViewById(R.id.option_help_exchange);
		relativeExchange.setOnClickListener(this);

		relativeForget = (RelativeLayout) findViewById(R.id.option_help_forget);
		relativeForget.setOnClickListener(this);

		relativeLottery = (RelativeLayout) findViewById(R.id.option_help_lottery);
		relativeLottery.setOnClickListener(this);

		relativeRealnameAuthentication = (RelativeLayout) findViewById(R.id.option_help_realname_authentication);
		relativeRealnameAuthentication.setOnClickListener(this);

		relativeRecharge = (RelativeLayout) findViewById(R.id.option_help_recharge);
		relativeRecharge.setOnClickListener(this);

		relativeRefund = (RelativeLayout) findViewById(R.id.option_help_refund);
		relativeRefund.setOnClickListener(this);

		relativeWithdraw = (RelativeLayout) findViewById(R.id.option_help_withdraw);
		relativeWithdraw.setOnClickListener(this);

	}

	@Override
	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		switch(arg0.getId()){
		
		case R.id.option_help_about:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#0"));
			
			break;
			
		case R.id.option_help_lottery:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#1"));
			
			break;
			
		case R.id.option_help_recharge:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#2"));
			
			break;
			
		case R.id.option_help_exchange:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#3"));
			
			break;
			
		case R.id.option_help_withdraw:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#4"));
			
			break;
			
		case R.id.option_help_refund:

			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#5"));
			
			break;
			
		case R.id.option_help_realname_authentication:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#6"));
			
			break;
			
		case R.id.option_help_bank_error:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#7"));
			
			break;
			
		case R.id.option_help_forget:
			
			startActivity(new Intent(HelpListAct.this,WebViewActivity.class).putExtra("title", "帮助").putExtra("url", Config.HELP_WEB_URL+"#8"));
			
			break;
			
		case R.id.option_help_list_act_btn_back:
			
			HelpListAct.this.finish();
			
			break;
		}
	}

}
